package com.dhecp.project.statistics.service.impl;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dhecp.core.constant.DataFiltering;
import com.dhecp.project.statistics.domain.UserSalesPerformanceXm;
import com.dhecp.project.statistics.mapper.UserSalesPerformanceXmMapper;
import com.dhecp.project.statistics.service.UserSalesPerformanceXmService;
import com.dhecp.project.system.service.SysDictionaryForFieldService;

/**
 * 项目利润统计 服务层
 * @author DH-lwl
 * @version 2020年6月9日
 */
@Service
public class UserSalesPerformanceXmServiceImpl implements
		UserSalesPerformanceXmService {

	private static final Logger log = LoggerFactory.getLogger(UserSalesPerformanceXmServiceImpl.class);
    
    @Autowired
    private UserSalesPerformanceXmMapper userSalesPerformanceXmMapper;

    @Autowired
    private SysDictionaryForFieldService dictionaryForFieldService;

	/**
	 * 项目利润统计 数据
	 * @param params
	 * @return List-UserSalesPerformanceXm
	 * @throws Exception
	 * @author DH-Xxj
	 */
    @Override
    public List<UserSalesPerformanceXm> queryUserSalesPerformanceXmList(Map<String, Object> params) throws Exception {
        params.put(DataFiltering.TABLE_ALIAS, "t1");	//查询表别名
        params.put(DataFiltering.WHERE_SCODE, dictionaryForFieldService.getWhereStr(params));	//查询条件字SQL语句，一般在存储过程中使用
        params.put(DataFiltering.DATA_SCODE, dictionaryForFieldService.getDataScode(params));	//数据权限查询条件SQL语句

        return userSalesPerformanceXmMapper.findUserSalesPerformanceXmList(params);
    }

}
